using System;
using System.Collections.Generic;
using UnityEngine;

public class RacketCallibrationDB : ScriptableObject
{
	[Serializable]
	public class ReferencePointDefinition
	{
		public enum PositionType
		{
			PointAtScreen = 0
		}

		public PositionType type;

		public Vector3 position;

		public Vector3 rotationEulerAngles;
	}

	private static RacketCallibrationDB instance_;

	public List<ReferencePointDefinition> referencePoints = new List<ReferencePointDefinition>();

	public static RacketCallibrationDB instance
	{
		get
		{
			if (instance_ == null)
			{
				instance_ = Resources.Load("GGServerAssets/RacketCallibrationDB", typeof(RacketCallibrationDB)) as RacketCallibrationDB;
			}
			return instance_;
		}
	}

	public ReferencePointDefinition GetDefinitionForType(ReferencePointDefinition.PositionType type)
	{
		foreach (ReferencePointDefinition referencePoint in referencePoints)
		{
			if (referencePoint.type == type)
			{
				return referencePoint;
			}
		}
		return null;
	}
}
